import React, { Component, Suspense } from 'react';
import { connect } from 'dva';
import { Layout, Menu, Breadcrumb, Carousel, Row, Col, Icon, Button, Divider, Tabs} from 'antd';
// import Ellipsis from '@/components/Ellipsis';
// import Slider from '@/components/Slider'
// import ActivitySlider from '@/components/ActivitySlider'
// import BigTitle from '@/components/BigTitle'
// import AboutUS from '@/components/AboutUS'
// import Question from '@/components/Question'
import InformationItem from '@/components/InformationItem'
// import {BIAOTI, GYWM, JIANTOU4, YUAN} from '../../constants'
import styles from './index.less';
// import router from 'umi/router';

@connect(({ chart, loading }) => ({
  // chart,
  // loading: loading.effects['chart/fetch'],
}))
class InformationList extends Component {
  state = {
  };

  componentDidMount() {
  }

  componentWillUnmount() {
  }

  informationClick = (id) =>{
    // router.push(`/informationDetail?id=${id}&key=3`)
    window.open(`http://home.himedu.cn/informationDetail?id=${id}&key=3`, '_blank')
  }

  onZixunClick = () => {
    // window.open('http://plt.zoosnet.net/LR/Chatpre.aspx?id=PLT70547676&lng=cn', '_blank')
    openJesongChatByGroup(13072,25026);return false;
    // window.open('https://tb.53kf.com/code/client/e87c220968f7fcbffe4a0165dd3e04c67/1', '_blank')
  }

  render() {
    const { data } = this.props;
    // console.log('item.sketch',data);

    return (
      <Row>
        <Col span={24}>
          <Row>
            <Col span={24}>
              <div style={{cursor: 'pointer', textAlign: 'center'}} onClick={this.onZixunClick}>
                <img style={{width: 150, height: 55}} src={'https://hua-jun-guan-wang.oss-cn-hangzhou.aliyuncs.com/%E9%A6%96%E9%A1%B5/dianjizixun.png'} />
              </div>
            </Col>
          </Row>
          {data.map((item, index) => (
            <Row style={{marginTop: 14}} key={index}>
              <Col span={24}>
                <a onClick={() => this.informationClick(item.id)}>
                  {/*<InformationItem title={localStorage.getItem('umi_locale') == 'zh-CN'?item.title:item.titleEN} content={localStorage.getItem('umi_locale') == 'zh-CN'?item.sketch:item.sketchEN}/>*/}
                  <InformationItem title={item.title} content={item.sketch}/>
                </a>
              </Col>
            </Row>
          ))}
        </Col>
      </Row>
    );
  }
}

export default InformationList;
